home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2005 Utilities / CHIP Utilities 2005 / CHIP Utilities 2005.iso / dosapps / freedos / doc / keyb / keyfiles.txt < prev    next >
Encoding:
Text File  |  2003-08-12  |  6.1 KB  |  202 lines

  1. PROTOTYPE 4 KEY FILES
  2. =====================
  3.  
  4. This document describes briefly how to create KEY files to be compiled with
  5. the prototype 4 KEY-compiler (KEYCOMP).
  6.  
  7. To learn how to use each version of the compiler, type
  8.  
  9.   KEYCOMP /?
  10.  
  11. as this file affects only the format of the KEY files.
  12.  
  13. NOTE: KEY files described in this document may be incompatible with the KEY
  14.       files used for xKEYB and for prototypes 1-3 of KEYB2.
  15.  
  16. NOTE: KEY files described in this document are definitely incompatible with
  17.       the KEY files that will be user with the standard compiler, to appear
  18.       in the prototype 5.
  19.  
  20. In this document, we will refer to prototype 4 KEY files simply as KEY files,
  21. unless stated otherwise.
  22.  
  23.  
  24. GENERAL FORMAT
  25. ==============
  26.  
  27. A KEY file is a normal text file, which the compiler takes as input. Any blank
  28. line, or any line starting with the ; character is ignored by the compiler
  29. (and can be used for comments).
  30.  
  31. The KEY file is composed of three sections, being the first one mandatory, and
  32. the later two optional.
  33.  
  34. Each section begins with the name of the section between sqare brackes: [] 
  35.  
  36. NOTES:
  37. (1) The order of the sections MUST be preserved. 
  38. (2) In the names of the sections, the compiler does not make any distinction
  39.     on case.
  40.  
  41. The sections are, on this order,
  42.  
  43. [KEYS]
  44. [COMBI]
  45. [XSTRINGS]
  46.  
  47.  
  48. KEYS Section
  49. ============
  50.  
  51. This section is mandatory. Each line in this section represents a key whose
  52. behaviour is affected. The general format of a line is:
  53.  
  54.   S  [T] [C] ...
  55.  
  56. where
  57.      S    scancode specifier with flags
  58.      C    effect
  59.  
  60. the line can be up to 5 effects long, and at least one effect must be
  61. specified, unless the flag X is used (in which case, 0 characters may be
  62. specified).
  63.  
  64. The scancode specifier is of the form:
  65.  
  66.   [E]n[C][N][Sm][X]
  67.  
  68. where
  69.  
  70.      [E]n   scancode number (makecode). The E is optional, and indicates that
  71.             the key has the E0 prefix. For a map of all the keys, see
  72.  
  73. http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/keyboard/scancodes1.html
  74. http://www.geocities.com/SiliconValley/Program/6366/keyboard/keyboard002.htm
  75.  
  76.  
  77.      CNSmX  are the flags. The order of them is irrelevant, PROVIDED if S is
  78.             specified, a number must mandatorily follow it.
  79.  
  80.               C    The key is affected by CapsLock
  81.               N    The key is affected by NumLock
  82.               Sm   The key changes its returned scancode to m
  83.               X    The key is completely locked and ignored (used to disable
  84.                    keys on a keyboard)
  85.  
  86.  
  87. An effect is either a character (see section below), or of the form
  88.  
  89.      [![l]]n
  90.  
  91. The later form is used to specify a COMMAND (see the command document).
  92.  
  93. In this version, the number of effects is limited to 5, where the columns
  94. correspond to the following combinations
  95.  
  96.    -    SHIFT    CTRL    ALT    ALTGr
  97.  
  98. If a character is specified under certain column, then when the appropriate
  99. character is released, otherwise the corresponding command is executed.
  100.  
  101. In the command format, n is the number of the column, and l is an optional
  102. letter that specifies a constant to be added, to make the commands more
  103. readable. The letters are:
  104.  
  105.  
  106.       Letter    Constant   Meaning
  107.      ============================================================
  108.        !C       199        COMBI
  109.        !L        99        Change layout
  110.        !S       119        Change submapping
  111.        !A       169        Alternative character introduction
  112.        !O       179        User defined locks
  113.        !H        89        user defined shifts
  114.      ============================================================
  115.  
  116. EXAMPLE:  !S1 is equivalent to !120
  117.  
  118. HINT: 0's compress better, so try to use !0 if the character is already
  119.       produced by the preceding KEYB handler (probably BIOS).
  120.  
  121. HINT: If less than 5 columns are described, missing ones are interpreted
  122.       as !0, although some space is saved. For example:
  123.  
  124.          12  '  ?  !0  !0  !0
  125.          12  '  ?
  126.  
  127.       are equivalent, but the former produces a smaller .KC file. Try to
  128.       avoid trailing !0's
  129.  
  130.  
  131. Specifying a character
  132. ======================
  133.  
  134. A character is specified on one of the following forms
  135.  
  136.      c         a character of code>33, other than #
  137.      #!        specifies the character !
  138.      ##        specifies the character #
  139.      #n        specifies the character n on the current codepage
  140.  
  141.  
  142. COMBI section
  143. =============
  144.  
  145. The COMBI section describes how to combine characters. The first line
  146. describes how to create the combined character for the first COMBI
  147. command, the second line for the second COMBI command, etc.
  148.  
  149. The line has the format
  150.  
  151. C0  C1C2  C3C4  C5C6 ...
  152.  
  153. where Ci's are characters (except for C0, they can be specified as
  154. mentioned in the preceding section). Up to 254 pairs can be
  155. specified.
  156.  
  157. C0 is the mark which is added to the letter (such as '), and each pair is a
  158. marked/unmarked pair, (such as aß).
  159.  
  160. NOTE: In order for the layout section to work properly, the KEYS section MUST
  161.       have all the non-combined characters (and they shouldn't be chained to
  162.       the previous handler with !0). For example, include the letter a if you
  163.       want to produce ß with COMBIs.
  164.  
  165. HINT: It is convenient to add the space in each line (such as #32') to make
  166.       it possible to get the mark character alone.
  167.  
  168.  
  169. XStrings
  170. ========
  171.  
  172. The last section contains the XStrings, sequentially, and one per line.
  173. The contents of the XStrings are free, except for the fact that special
  174. effects may be used if preceded by the character \
  175.  
  176. The following effects are possible:
  177.        \Axxx         Produces the character of code xxx
  178.        \Kxxx,yyy     produces the character code yyy with scancode xxx
  179.        \Sxxx     Produces the character 0 with scancode S
  180.        \n         Produces a carriage return
  181.        \\         Produces the \ character
  182.        \[key]        Simulates the pressing of a key
  183.  
  184. The simulated keys can be:
  185.  
  186.      HOME
  187.      END
  188.      PGUP
  189.      PGDN
  190.      UP
  191.      DOWN
  192.      LEFT
  193.      RIGHT
  194.      DEL
  195.      INS
  196.      Fx  (function)
  197.      SFx (shift+function)
  198.      CFx (control+function)
  199.      AFx (alt+function)
  200.  
  201. =========== END OF DOCUMENT ===============
  202.